import { DemoModel } from "@/models/Demo/DemoModel";
import { HttpClient } from "@/utils/HttpClient";




/**
 * 示例
 */
export class DemoService {



    /**
     * 获取更新数据
     * @param id 
     */
    static async getUpdateDataAsync(id: number) {


        //return await HttpClient.postAsResult<DemoModel.UpdateData>("demo/updatedata");

        let data: DemoModel.UpdateData = {
            id: 1,
            name: "悠闲的酱油瓶",
            logo: "https://img2.woyaogexing.com/2022/07/01/456101da549bd659!400x400.jpg",
            hobby: "1",
            age: 1,
            intro: "23",
            createDate: "2022-07-05"
        };
        return await new Promise<DemoModel.UpdateData>((resolve, reject) => {
            setTimeout(() => {
                resolve(data);
            }, 10)
        });
    }

}